//
//  ViewController.m
//  AudioServersDemo
//
//  Created by Lucky on 15/10/7.
//  Copyright © 2015年 Lucky. All rights reserved.
//

#import "ViewController.h"

//* 1.引用框架 */
#import <AVFoundation/AVFoundation.h>

#import "JKRAudioToll.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
//    //* 2.获取音效文件路径 */
//    NSURL *url = [[NSBundle mainBundle] URLForResource:@"normal.aac" withExtension:nil];
//    
//    //* 3.加载音效文件，等到对应的音效ID */
//    SystemSoundID soundID;
//    
//    AudioServicesCreateSystemSoundID((__bridge CFURLRef _Nonnull)(url), &soundID);
//    
//    //* 播放音效 */
//    AudioServicesPlaySystemSound(soundID);
    
    [JKRAudioToll playAudioWithFileName:@"m_17.wav"];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
    [JKRAudioToll disposeAudioWithFileName:@"m_17.wav"];
}

@end
